﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Portal.Model;

namespace Portal.Repository
{
	/// <summary>
	/// Interface <see cref="IUserRepository"/> declare repository of user
	/// </summary>
	public interface IUserRepository : IDisposable
	{
		/// <summary>
		/// Gets user by its login 
		/// </summary>
		/// <param name="login"></param>
		/// <returns>User</returns>
	 	IUser GetBy(string login);

		/// <summary>
		/// Insert new user
		/// </summary>
		/// <param name="user"></param>
		/// <returns>User</returns>
		IUser AddOrUpdate(IUser user);
	}
}
